package com.niiwoo.civet.trade.dao.mapper.credit;

import com.niiwoo.civet.trade.dao.entity.credit.CreditProjectGuarantee;
import com.niiwoo.civet.trade.dto.CreditProjectDTO;
import com.niiwoo.civet.trade.dto.response.credit.CreditLoanGuaranteeProjectResponseDTO;
import com.niiwoo.civet.trade.dto.response.credit.CreditLoanGuaranteeStatisticsResponseDTO;
import org.apache.ibatis.annotations.Param;

import java.util.List;


public interface CreditProjectGuaranteeMapperExt extends CreditProjectGuaranteeMapper {

    /**
     * 根据项目ID查询 担保列表
     * @param projectId 项目ID
     * @return
     */
    List<CreditProjectGuarantee> getGuaranteesByProjectId(Long projectId);
    Integer totalCreditLoanGuaranteProjectNum(@Param("guaranteeUserId") String guaranteeUserId);

    List<CreditProjectGuarantee> queryCreditProjectGuarantee(@Param("projectId") Long projectId,@Param("userId") String userId);

    /**
     * 用户总的担保笔数
     * @param guaranteeUserId
     * @return
     */
    Integer countTotalGuaranteeNum(@Param("guaranteeUserId") String guaranteeUserId);

    /**
     * 用户担保收益统计信息
     * @param guaranteeUserId
     * @return
     */
    CreditLoanGuaranteeStatisticsResponseDTO countCreditLoanGuarantee(@Param("guaranteeUserId") String guaranteeUserId);

    List<CreditProjectGuarantee> queryCreditProjectGuaranteeList(@Param("projectId") Long projectId,@Param("userId") String userId);

    List<CreditLoanGuaranteeProjectResponseDTO> queryGuaranteeProject(@Param("guaranteeUserId")  String userId, @Param("pageSize")int pageSize);

    List<CreditProjectDTO> queryAllGuaranteeProject(@Param("guaranteeUserId")  String userId, @Param("pageSize")int pageSize);
}